energy conservation in case of shm